package org.demo.pattern.flyweight;
/**
 * 共享模式
 * 使用一个对象池来存放大家所共享的内容，从而避免拥有大量相同内容小类的开销
 * @author  
 * @date    2011-5-20
 * @file    org.demo.pattern.flyweight.FlyweightTest.java
 */
public class FlyweightTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		CD cd1 = new CD(20070928, "爱-歌姬", ArtistFactory.getArtist("飞儿"));
		CD cd2 = new CD(20060728, "飞行部落", ArtistFactory.getArtist("飞儿"));

		System.out.println(cd1);
		System.out.println(cd2);
	}

}
